import tushare as ts
# 设置tushare token
ts.set_token("e941e05794eb0fab2f477fba2a34738571a597f8ecd83203f2b783c6")
# 创建tushare数据接口
pro = ts.pro_api()
# 获取宁德时代股票数据
df = pro.daily(ts_code='300750.SZ', start_date='20180601', end_date='20230319')
# 将数据保存为CSV文件
df.to_csv('Ningde data.csv', index=False)